package com.megvii.koala.tv.net.tv;

import com.megvii.corelib.net.RequestParam;
import com.megvii.corelib.net.request.MegviiRequest;
import com.megvii.koala.tv.net.TVCommands;

import java.util.List;

/**
 * Created by linyue on 16/3/16.
 */
public class SetDisplayConfigRequest implements MegviiRequest
{
    @RequestParam
    public String box_token;

    @RequestParam
    public String device_token;

    @RequestParam
    public int[] screens;

    @RequestParam
    public int video_screen;

    public SetDisplayConfigRequest(String boxToken, String deviceToken, List<Integer> screenIds,
            int videoScreenId)
    {
        super();
        this.box_token = boxToken;
        this.device_token = deviceToken;
        if (screenIds != null)
        {
            screens = new int[screenIds.size()];
            int i = 0;
            for (int screenId : screenIds)
            {
                screens[i++] = screenId;
            }
        }
        this.video_screen = videoScreenId;
    }

    @Override
    public String getCommand()
    {
        return TVCommands.SET_DISPLAY_CONFIG;
    }
}
